#include <stdio.h>
#include <math.h>
main()
{
   float x, stx, sint, e;
   int i, fact, z;
   printf("Please enter x: ");
   scanf("%5.5f", &x);
   printf("Enter the precision e: ");
   scanf("%5.5f", &e);
     stx = x; /* the pow of x*/
	 fact = 1;/* the value of factorial in denominator*/
	 sint = 0;/* the first element on expansion*/
	 i = 1;/* counter*/
	 z = 1;/* the sign of element*/
	 while ( ( stx / fact ) >= e )
	   {
	      sint = sint + z * stx / fact;
          i = i + 2;
          stx = stx * x * x;
          fact = fact * (i - 1) * i;
          z = z * (-1);  		  
	   }
	   printf("Quantity of elements in expansion =  %d\n ", i / 2);
	   printf("Value sin %6.6f\n", sint);
	   printf("Value of computer: %6.6f", sinf(x) );
	   
	 
}
